#include "rclcpp/rclcpp.hpp"
#include "std_msgs/msg/string.hpp"

using std::placeholders::_1;


class Listen: public rclcpp::Node
{
    public:
    Listen():Node("listen"){
        subscription_ = this->create_subscription<std_msgs::msg::String>("aimoe_topic",10,std::bind(&Listen::listener_callback,this,_1));
    }
    
    private:
    
    rclcpp::Subscription<std_msgs::msg::String>::SharedPtr subscription_;
    void listener_callback(const std_msgs::msg::String &msg)const
    {
        RCLCPP_INFO(this->get_logger(),"recive: %s",msg.data.c_str());
    }
};


int main(int argc,char** argv)
{
    rclcpp::init(argc,argv);
    rclcpp::spin(std::make_shared<Listen>());

    rclcpp::shutdown();
    return 0;


}